-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CS2113T-T09-4] Simplst #6
base: master
Are you sure you want to change the base?
[CS2113T-T09-4] Simplst #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall good implementation! One more thing to consider is to put the UML diagrams on a new line. Some UML diagrams are right after the sentence, causing formatting issues
#### Description | ||
The goods class keeps track of the various inventory that will be input into the system through the commands class. | ||
The diagram below shows the model component of the orderline class. | ||
![Good Class Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/Good.puml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the UML format does not really follow the standards we learnt in lecture. Eg we use "+", "-", "#" or "~" to indicate the visibilities, but in the UML diagram shown it used a red square and green circle
Also the return type should be at the end instead. Eg:
getId(): Int
instead of:
int getId()
docs/DeveloperGuide.md
Outdated
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
### Good Class | ||
#### Description | ||
The goods class keeps track of the various inventory that will be input into the system through the commands class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can consider highlighting important words to aid readability
The goods class keeps track of the various inventory that will be input into the system through the commands class. | |
The `goods` class keeps track of the various inventory that will be input into the system through the commands class. |
docs/DeveloperGuide.md
Outdated
### Regex Class | ||
#### Description | ||
The Regex Class is created to simplify the use of regular expressions in Java. | ||
![Regex Class Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/Regex.puml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
View Good belongs as part of the Commands Class. It is used when a user would like to know more information about an inventory item has an item id linked to it in the warehouse. | ||
|
||
#### Operation | ||
![View Good Sequence Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/viewGood.puml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return arrows should be dotted
@@ -4,26 +4,162 @@ | |||
|
|||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | |||
|
|||
## Design & implementation | |||
|
|||
## Design |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can consider giving a high level overview of the architecture first, before diving deep into explaining each detail
#### Description | ||
The goods class keeps track of the various inventory that will be input into the system through the commands class. | ||
The diagram below shows the model component of the orderline class. | ||
![Good Class Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/Good.puml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![Regex Class Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/Regex.puml) | ||
The Class Diagram above shows the different variables and methods associated with the regex class. | ||
This class takes in the regular expression as a string and the string to be matched in the class contructor, and stores the results | ||
in the private variable `groupValues` which is a Hash Map where the key would be the capture group name and the value as the matched results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
View Good belongs as part of the Commands Class. It is used when a user would like to know more information about an inventory item has an item id linked to it in the warehouse. | ||
|
||
#### Operation | ||
![View Good Sequence Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/viewGood.puml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
3.1.1 Lastly, the list of orders is printed to the command line. | ||
3.2 Else, if the flag is `g/`, the User Interface Class will call the listGoods() method in the Warehouse class | ||
3.2.1 Following that, the Warehouse class will call the getGoods() method on the Good class | ||
3.2.2 Lastly, the list of goods is printed to the command line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
4. This method will then iterate through orderLists and sum up each quantity of each Good object in each order. | ||
5. The totalGoods() method will return an integer of the number of goods in the warehouse. | ||
|
||
For more examples of how a user can use a command, refer to the [UserGuide](/UserGuide.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
View Good belongs as part of the Commands Class. It is used when a user would like to know more information about an inventory item has an item id linked to it in the warehouse. | ||
|
||
#### Operation | ||
![View Good Sequence Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/viewGood.puml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
|
||
### View Good Method | ||
#### Description | ||
View Good belongs as part of the Commands Class. It is used when a user would like to know more information about an inventory item has an item id linked to it in the warehouse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to show the command format separately in text form as a code block, as well as an example. They are currently only visible in the sequence diagrams which makes it hard to copy and paste them, and is less obvious to the reader.
docs/DeveloperGuide.md
Outdated
3. The Regex Class will then be called to match the rest of the user's input to find the values required to remove goods from the inventory. | ||
4. Afterwards, the User Interface class will call removeGood() method from the Commands Class | ||
5. This method will then reduce the quantity of a type of goods if the quantity input is not larger than the existing quantity. If the quantity input is the same as the existing quantity, the goods object will be removed from the inventory. | ||
6. The UI will show a message of format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider including more details on what methods are called and what types of objects are returned by each method, to make the implementation of this program clearer.
docs/DeveloperGuide.md
Outdated
View Good belongs as part of the Commands Class. It is used when a user would like to know more information about an inventory item has an item id linked to it in the warehouse. | ||
|
||
#### Operation | ||
![View Good Sequence Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/viewGood.puml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
View Good belongs as part of the Commands Class. It is used when a user would like to know more information about an inventory item has an item id linked to it in the warehouse. | ||
|
||
#### Operation | ||
![View Good Sequence Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/viewGood.puml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
### Good Class | ||
#### Description | ||
The goods class keeps track of the various inventory that will be input into the system through the commands class. | ||
The diagram below shows the model component of the orderline class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An orderline
class is mentioned here, but there is no prior explanation or link to this class beforehand.
docs/DeveloperGuide.md
Outdated
``` | ||
String regex = "id/(?<id>\\d*) n/(?<name>.*) q/(?<qty>\\d*) d/(?<desc>\\.*)"; | ||
Regex regexMatch = new Regex(userInput, regex); | ||
HashMap<String, String> matches = regexMatch.getGroupValues(); | ||
String id = matches.get("id"); | ||
String name = matches.get("name"); | ||
String quantity = matches.get("qty"); | ||
String description = matches.get("desc"); | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good that an example is given on how it works, but perhaps some explanation could be given for the regex pattern?
docs/DeveloperGuide.md
Outdated
3. Together with the previous step, the User Interface Class will check the flag followed by `list` | ||
3.1 If the flag is `o/`, the User Interface Class will call the listOrders() method in the Warehouse class | ||
3.1.1 Lastly, the list of orders is printed to the command line. | ||
3.2 Else, if the flag is `g/`, the User Interface Class will call the listGoods() method in the Warehouse class | ||
3.2.1 Following that, the Warehouse class will call the getGoods() method on the Good class | ||
3.2.2 Lastly, the list of goods is printed to the command line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe some formatting error here!
docs/DeveloperGuide.md
Outdated
#### Description | ||
The Commands Class is the class which contains all the available commands that can be used in the Simplst CLI application. | ||
![Commands Class Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/CommandsClass.puml) | ||
|
||
More about how each feature is run can be seen in each of the methods that can be found below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps an explanation can be given for why this design of putting all commands into a single class was chosen rather than subclassing different commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, slight changes to the formatting and diagrams would make it better!:)
docs/DeveloperGuide.md
Outdated
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
### Good Class | ||
#### Description | ||
The goods class keeps track of the various inventory that will be input into the system through the commands class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes as @khseah said, I also think denoting the class names as code would be good. In addition I think it would be better to capitalise it as well (e.g. Good
)
docs/DeveloperGuide.md
Outdated
> `quantity` `name` have been removed | ||
to show that the operation is successful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting could be improved here
docs/DeveloperGuide.md
Outdated
![List sequence Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/List.puml) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
### Regex Class | ||
#### Description | ||
The Regex Class is created to simplify the use of regular expressions in Java. | ||
![Regex Class Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/Regex.puml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
View Good belongs as part of the Commands Class. It is used when a user would like to know more information about an inventory item has an item id linked to it in the warehouse. | ||
|
||
#### Operation | ||
![View Good Sequence Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/AY2122S2-CS2113T-T09-4/tp/master/docs/diagrams/viewGood.puml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return lines should be dotted.
Branch shyun yin dg
All features should be done except storage. Small fixes here and there included
This reverts commit 29dce37.
Checkstyle and bug fixes
Branch jun leong storage
Branch jun leong storage
2101 userguide updates
# Conflicts: # src/main/java/seedu/simplst/Simplst.java
adding tips for UG
…into branch-Shyunyin-2101UG1 # Conflicts: # docs/UserGuide.md
Branch shyunyin 2101 ug1
Update UserGuide.md
This reverts commit e719c1d.
Revert "Update StorageTest.java"
Simplst is a laptop app for managing warehouse inventory and processes, optimized for use via a Command Line Interface (CLI) for warehouse management workers.